import time, subprocess
process = subprocess.Popen(['python', 'pyTest.py'], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
for i in range(5):
     process.stdin.write('%d\n' % i)
     output = process.stdout.readline()
     print (output)
     time.sleep(1)
